<?php
/*
 *
 * @package MoltX
 * @author $Author$
 * @version $Id$
 * @link $URL$
 * @copyright Copyright (c) 2005-2010, Matthew Oltendorf
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 *
 */

/*
 * @ignore
 */
if ( ! defined ( 'blink' ) )
{
	// Access denied.
	header ( $_SERVER [ 'SERVER_PROTOCOL' ] . ' 403 Forbidden' );
	echo '403 - Forbidden';

	exit;
}

if ( $output )
{
	$output = <<<OUTPUT


			<div class="wrap">
				<p>
					<span class="title">Output</span><br />
					<span class="trace">$output</span>
				</p>
			</div>
OUTPUT;
}

return <<<ERROR_DOC
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

		<style type="text/css">
			* {
				margin: 0;
				padding: 0;
			}

			html {
				background-color: rgb(200,200,200);
				overflow-y: scroll;
			}

			.wrap {
				background-color: rgb(255,255,255);
				border-color: rgb(0,128,0);
				border-style: dashed;
				border-width: 2px;
				margin: 10px;
				padding: 10px;
			}

			.header {
				text-align: center;
			}

			.title {
				font-weight: bold;
			}

			.trace {
				font-family: monospace;
				white-space: pre;
			}
		</style>

		<title>Uncaught Exception</title>
	</head>

	<body>
		<div class="wrap">
			<h1 class="header">Uncaught Exception</h1>

			<p>
				<span class="title">Message:</span>
				<span class="message">$message</span>
			</p>

			<p>
				<span class="title">File:</span>
				<span class="message">$file</span>
			</p>

			<p>
				<span class="title">Line:</span>
				<span class="message">$line</span>
			</p>

			<div class="wrap">
				<p>
					<span class="title">Trace</span><br />
					<span class="trace">$trace</span>
				</p>
			</div>$output
		</div>
	</body>
</html>

ERROR_DOC;
